{#
This is a fragment template that can be used for both an activity or an assesment
The rendered HTML will be activated by activty2-generic.js with no need to any additional js files.
If this is an assessment, this and other question types should encapsulated in a form element, to be submitted back to the server for marking.
If this is an activity, then no form reponse is required.

Renders a group of multiple choice questions.
Expects a context of the form 

is_activity: True if this is an activity false or not present if an assessment.
question_groups : [
	{
	   questionid : a unique id for the question,
	   question: html containing the question,
	   choices : [
	      {
	         answer : an answer
	         feedback : a feeback message
	         correct : True if correct
	      }
	      ...
	   ]
	
	}
	...
]


{
  "question" : "The next several questions explore what elements impact the order in which Google returns your results. Mark whether each statement is true or false, according to Matt Cutts:<p>",
  "all_correct_output" : "Please scroll down for another activity.",
  "some_incorrect_output" : "Sorry you got __CORRECT__ out of __TOTAL__ correct, please try again",
  "question_groups" : [
      {
        "question" : "Pages that have the words you type in, or synonyms for those words, are listed higher.",
        "choices" : [
          {
            "answer" : "True",
            "feedback" : "Correct, pages that have the words you type in, or synonyms for those words, are listed higher.",
            "correct" : true
          },
          {
            "answer" : "False",
            "feedback" : "Incorrect, one more go!",
            "correct" : false
          }
        ]
      },
      {
        "question" : "Pages with font size the same as you type into Google get listed first.",
        "choices" : [
          {
            "answer" : "True",
            "feedback" : "Incorrect",
            "correct" : false
          },
          {
            "answer" : "False",
            "feedback" : "Correct, Font size is irrelevant",
            "correct" : true
          }
        ]
      },
      {
        "question" : "Pages where the words you typed in appear in the title or web address get listed higher.",
        "choices" : [
          {
            "answer" : "True",
            "feedback" : "Correct, Pages where the words you typed in appear in the title or web address get listed higher.",
            "correct" : true
          },
          {
            "answer" : "False",
            "feedback" : "Incorrect",
            "correct" : false
          }
        ]
      },
      {
        "question" : "Webmasters can get higher ranking in the results by paying Google money.",
        "choices" : [
          {
            "answer" : "True",
            "feedback" : "Incorrect",
            "correct" : false
          },
          {
            "answer" : "False",
            "feedback" : "Correct, Webmasters can't buy higher ranking results from Google.",
            "correct" : true
          }
        ]
      },
      {
        "question" : "If the words you type in appear near each other on a page, it may get listed higher in your results.",
        "choices" : [
          {
            "answer" : "True",
            "feedback" : "Incorrect",
            "correct" : false
          },
          {
            "answer" : "False",
            "feedback" : "Correct, Word distance does not effect ranking.",
            "correct" : true
          }
        ]
      },
      {
        "question" : "Pages which are linked to by lots of other pages--especially other high quality pages--are listed higher.",
        "choices" : [
          {
            "answer" : "True",
            "feedback" : "Correct",
            "correct" : true
          },
          {
            "answer" : "False",
            "feedback" : "Incorrect",
            "correct" : false
          }
        ]
      }     
    ]
 }
#}
<div class="gcb_q_multiple_choice_container" >
  <div class="gcb_a_editable_area" gcb-a-action="/editor/{{ activity.id }}/activity/question/" > >{{ activity.question }}</div>
  {% for group in activity.question_groups %}
	<div class="gcb_q_multiple_choice_group" >
	    <div class="gcb_a_editable_area"  gcb-a-action="/editor/{{ activity.id }}/activity/todo/" >>{{ group.question }}</div>
		<ul class="gcb_q_choices">
			{% for choice in group.choices %}
			<li>
			<span class="gcb_q_hidden gcb_q_feeedback gcb_a_editable"  gcb-a-action="/editor/{{ activity.id }}/activity/todo/" >{{ choice.feedback }}</span>
			<input class="{% if activity.is_activity and choice.correct %} gcb_q_correct {% endif %} q_multiple_choice " type="radio" name="q{{ group.questionid }}" /><span class="gcb_a_editable" gcb-a-action="/editor/{{ activity.id }}/activity/todo/">{{ choice.answer }}</span></li>
			{% endfor %}
		</ul>
	</div>
  {% endfor %}
  {% if activity.is_activity %}
  <ul class="gcb_q_answer" >
	  <li><a class="gcb-button gcb-button-primary gcb_q_check_answer" >Check Answer</a></li>
	  <li>
	  <div class="gcb_q_hidden">
	     <div class="gcb_q_all_correct gcb_a_editable" gcb-a-action="/editor/{{ activity.id }}/activity/all_correct_output/">{{ activity.all_correct_output }}</div>
	     <div class="gcb_q_some_correct gcb_a_editable" gcb-a-action="/editor/{{ activity.id }}/activity/some_incorrect_output/" >{{ activity.some_incorrect_output }} </div>
	  </div>
	  <div class="gcb_q_feedback_box"></div>
	  </li>
  </ul>
  {% endif %}
</div>

